//
//  HttpRequest.m
//  RuiBenO2O
//
//  Created by LiYinDi on 14-10-14.
//  Copyright (c) 2014年 RuiBen. All rights reserved.
//

#import "HttpRequest.h"
#import "HttpBaseModel.h"

@implementation HttpRequest
+(void)requestData:(NSString *)dataPath params:(NSMutableDictionary *)params success:(void(^)(BOOL isSuccess,SeverData *severDataDict))success
{
    [HttpBaseModel severRequest:dataPath params:params onCompletion:^(NSDictionary *responseData)
     {
         SeverData *dataContent=[[SeverData alloc] init];
         dataContent.dataDict=responseData;
         success(YES,dataContent);
     }
      onError:^(NSString *error)
     {
         SeverData *dataContent=[[SeverData alloc] init];
         dataContent.resultStr=error;
         NSLog(@"error.localizedDescription===%@",error);
         success(NO,dataContent);
     }];
}
+(void)requestData1:(NSString *)dataPath params:(NSMutableDictionary *)params success:(void(^)(BOOL isSuccess,SeverData *severDataDict))success
{
    [HttpBaseModel severRequest1:dataPath params:params onCompletion:^(NSDictionary *responseData)
     {
         SeverData *dataContent=[[SeverData alloc] init];
         dataContent.dataDict=responseData;
         success(YES,dataContent);
     }
                        onError:^(NSString *error)
     {
         SeverData *dataContent=[[SeverData alloc] init];
         dataContent.resultStr=error;
         NSLog(@"error.localizedDescription===%@",error);
         success(NO,dataContent);
     }];
}
//+(void)requestData2:(NSString *)dataPath params:(NSMutableDictionary *)params success:(void(^)(BOOL isSuccess,SeverData *severDataDict))success
//{
//    [HttpBaseModel severRequest2:dataPath params:params onCompletion:^(NSDictionary *responseData)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.dataDict=responseData;
//         success(YES,dataContent);
//     }
//                         onError:^(NSString *error)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.resultStr=error;
//         NSLog(@"error.localizedDescription===%@",error);
//         success(NO,dataContent);
//     }];
//}
//+(void)requestData3:(NSString *)dataPath params:(NSMutableDictionary *)params success:(void(^)(BOOL isSuccess,SeverData *severDataDict))success
//{
//    [HttpBaseModel severRequest3:dataPath params:params onCompletion:^(NSDictionary *responseData)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.dataDict=responseData;
//         success(YES,dataContent);
//     }
//                         onError:^(NSString *error)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.resultStr=error;
//         NSLog(@"error.localizedDescription===%@",error);
//         success(NO,dataContent);
//     }];
//}
//+(void)requestData4:(NSString *)dataPath params:(NSMutableDictionary *)params success:(void(^)(BOOL isSuccess,SeverData *severDataDict))success
//{
//    [HttpBaseModel severRequest4:dataPath params:params onCompletion:^(NSDictionary *responseData)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.dataDict=responseData;
//         success(YES,dataContent);
//     }
//                         onError:^(NSString *error)
//     {
//         SeverData *dataContent=[[SeverData alloc] init];
//         dataContent.resultStr=error;
//         NSLog(@"error.localizedDescription===%@",error);
//         success(NO,dataContent);
//     }];
//}

@end
